bitkeeper revision 1.140 (3e746e649qRG4zMj_6-1prPYQZwRrw)
authorrn@wyvis.research.intel-research.net <rn@wyvis.research.intel-research.net>
Sun, 16 Mar 2003 12:30:28 +0000 (12:30 +0000)
committerrn@wyvis.research.intel-research.net <rn@wyvis.research.intel-research.net>
Sun, 16 Mar 2003 12:30:28 +0000 (12:30 +0000)
sanity check for long APIC ISR

xen/arch/i386/apic.c

index e8e25e7f17d9ec8035013268eaeedc3f8579dabc..e90c17e0c9efa446902df98c74fa1bef80494f6e 100644 (file)
@@ -46,6 +46,8 @@
 #include <asm/pgalloc.h>
 #include <asm/hardirq.h>
 #include <asm/apic.h>
+
+#include <asm/timex.h>
 #include <xeno/ac_timer.h>
 #include <xeno/perfc.h>
 
@@ -746,6 +748,8 @@ unsigned int apic_timer_irqs [NR_CPUS];
 void smp_apic_timer_interrupt(struct pt_regs * regs)
 {
     int cpu = smp_processor_id();
+    u32 cc_start, cc_end;
+    rdtscl(cc_start);
 
     /*
      * the NMI deadlock-detector uses this.
@@ -766,6 +770,10 @@ void smp_apic_timer_interrupt(struct pt_regs * regs)
 
     if (softirq_pending(cpu))
         do_softirq();
+
+    rdtscl(cc_end);
+    if ( (cc_end - cc_start) > (cpu_khz * 100) )
+        printk("APIC Long ISR on CPU=%02d %08X -> %08X\n",cpu,cc_start,cc_end);
 }
 
 /*